package com.usian.search.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.dtos.UserSearchDto;
import com.usian.search.UserSearchControllerApi;
import com.usian.search.service.UserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/search")
public class UserSearchController implements UserSearchControllerApi {

    @Autowired
    private UserSearchService userSearchService;


    @Override
    @RequestMapping("/search")
    public ResponseResult search(@RequestBody UserSearchDto dto) {
        return userSearchService.search(dto);
    }
}
